$(function(){
    new QWebChannel(qt.webChannelTransport, function(channel) {
        window.mainObject = channel.objects.mainObject;
        console.log(mainObject);

    })

})